package cn.agiledata.bank.common.service.email;

import java.util.Date;
import java.util.Map;

import cn.agiledata.bank.common.service.NotifyMail;
import cn.agiledata.bank.common.util.DateUtil;
import cn.agiledata.bank.common.util.WeatherUtil;
import cn.agiledata.bank.hibernateBean.ScoresHis;
import cn.agiledata.bank.hibernateBean.SubAccount;
import cn.agiledata.bank.hibernateBean.Transaction;

public class SubAcctExMail extends NotifyMail{

	protected SubAccount setMailContext(Map vnvMap, Transaction tran, ScoresHis score) {
		String now = DateUtil.date2String(new Date());
		String creditName = WeatherUtil.getNameOrEmailOrMobileByAccount(tran.getCredit().getAccount());
		vnvMap.put("name", creditName);
		vnvMap.put("tranTime", now);
		vnvMap.put("tranID", tran.getTransId());
		vnvMap.put("debit", tran.getDebit().getAccountName());
		vnvMap.put("credit", tran.getCredit().getAccountName());
		vnvMap.put("amount", tran.getAmount().toString());
		String titlemessage=" 您于"+now+"进行了以下操作：";
		vnvMap.put("titlemessage",titlemessage );
		return tran.getCredit();
	}

}
